//
//  AppDelegate.swift
//  SwiftProject
//
//  Created by 杨晓生 on 16/8/3.
//  Copyright © 2016年 XS. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        //1.创建window
        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window?.backgroundColor = UIColor.whiteColor()
        window?.rootViewController = XSTabBarController()
        //2.显示window
        window?.makeKeyAndVisible()
        
        //设置外观
        setupAppearance()
        return true
    }
    
    
    // 一经设置，全局有效，应该尽早设置
    func setupAppearance(){
        UINavigationBar.appearance().tintColor = UIColor.orangeColor()
        UITabBar.appearance().tintColor = UIColor.orangeColor()
    }

}

